const wxRed = () => {
    logd('抢红包' + timeString());
    const selectors = id('com.tencent.mm:id/u1');
    const isResult = has(selectors);
    if (isResult) {
        const nodes = selectors.getNodeInfo(0);
        if (nodes && nodes.length > 0) {
            nodes.reverse().forEach(node => {
                const siblingsList = node.siblings();
                let isClick = true;
                if (siblingsList && siblingsList.length > 0) {
                    // 已领取
                    const find = siblingsList.find(child => child.id === 'com.tencent.mm:id/tt');
                    if (find) {
                        isClick = false;
                    }
                }
                if (isClick) {
                    node.click();
                    const open = id('com.tencent.mm:id/f4f').desc('开').getOneNodeInfo(5 * 1000);
                    if (open) {
                        open.click();
                    }
                }
            });
        }
    }
}
